package org.fireflow2.designer.eclipse.parts.simulator;

import java.beans.PropertyChangeEvent;

import org.fireflow2.designer.eclipse.parts.basic.BasicActivityPart;
import org.fireflow2.designer.eclipse.modelwrapper.AbsWrapper;
import org.fireflow2.designer.eclipse.simulation.SimulatorPanel;

public class ActivityPart4Simulator extends BasicActivityPart {
	public void propertyChange(PropertyChangeEvent evt) {
		if (evt.getPropertyName().equals(
				AbsWrapper.SIMULATION_PROPERTY_COMPLETED)) {
			this.getFigure().setForegroundColor(SimulatorPanel.SimulationColorMap.get(AbsWrapper.SIMULATION_PROPERTY_COMPLETED));
		} else if (evt.getPropertyName().equals(
				AbsWrapper.SIMULATION_PROPERTY_RUNNING)) {
			this.getFigure().setForegroundColor(SimulatorPanel.SimulationColorMap.get(AbsWrapper.SIMULATION_PROPERTY_RUNNING));
		} else if (evt.getPropertyName().equals(
				AbsWrapper.SIMULATION_PROPERTY_WAITING)) {
			this.getFigure().setForegroundColor(SimulatorPanel.SimulationColorMap.get(AbsWrapper.SIMULATION_PROPERTY_WAITING));
		} else if (evt.getPropertyName().equals(
				AbsWrapper.SIMULATION_PROPERTY_ORIGINAL)) {
			this.getFigure().setForegroundColor(SimulatorPanel.SimulationColorMap.get(AbsWrapper.SIMULATION_PROPERTY_ORIGINAL));
		}
		super.propertyChange(evt);
	}
}
